﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackEnd/SiteBackEnd.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Fashion.BackEnd.ManageAccount.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cplMain" runat="server">
<asp:DataGrid ID="grdAccount" runat="server" AutoGenerateColumns="False" AllowPaging="True"
        BackColor="White" BorderColor="#999999" BorderStyle="None" 
        BorderWidth="1px" ShowFooter="true"
        CellPadding="3" GridLines="Vertical" 
        onitemdatabound="grdAccount_ItemDataBound" 
        onitemcommand="grdAccount_ItemCommand" >
        <AlternatingItemStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:TemplateColumn>
                <HeaderTemplate>Id</HeaderTemplate>
                <ItemTemplate><%#Eval("Id") %></ItemTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>User Role</HeaderTemplate>
                <ItemTemplate><asp:DropDownList ID="cboUserRole" runat="server"></asp:DropDownList></ItemTemplate>
                <FooterTemplate><asp:DropDownList ID="cboUserRole" runat="server"></asp:DropDownList></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>User Name</HeaderTemplate>
                <ItemTemplate><asp:TextBox ID="txtUserName" runat="server" Text='<%#Eval("UserName") %>' Width="100px" ></asp:TextBox></ItemTemplate>
                <FooterTemplate><asp:TextBox ID="txtUserName" runat="server" Width="100px"></asp:TextBox></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Password</HeaderTemplate>
                <ItemTemplate><asp:TextBox ID="txtPassword" runat="server" Text='<%#Eval("Password") %>' Width="100px"  ></asp:TextBox></ItemTemplate>
                <FooterTemplate><asp:TextBox ID="txtPassword" runat="server" Width="100px"  ></asp:TextBox></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>First Name</HeaderTemplate>
                <ItemTemplate><asp:TextBox ID="txtFirstName" runat="server" Text='<%#Eval("FirstName") %>' Width="100px"  ></asp:TextBox></ItemTemplate>
                <FooterTemplate><asp:TextBox ID="txtFirstName" runat="server" Width="100px"  ></asp:TextBox></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>LastName</HeaderTemplate>
                <ItemTemplate><asp:TextBox ID="txtLastName" runat="server" Text='<%#Eval("LastName") %>'  Width="100px" ></asp:TextBox></ItemTemplate>
                <FooterTemplate><asp:TextBox ID="txtLastName" runat="server" Width="100px"  ></asp:TextBox></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Email</HeaderTemplate>
                <ItemTemplate><asp:TextBox ID="txtEmail" runat="server" Text='<%#Eval("Email") %>'  Width="100px" ></asp:TextBox></ItemTemplate>
                <FooterTemplate><asp:TextBox ID="txtEmail" runat="server" Width="100px"  ></asp:TextBox></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <HeaderTemplate>Active</HeaderTemplate>
                <ItemTemplate><asp:ImageButton ID="btnIsActive" CommandName='cmdIsActive' CommandArgument='<%#Eval("Id") %>' runat="server" ImageUrl='<%#Convert.ToBoolean(Eval("IsActive"))?"/Images/BackEnd/Icon/Active.gif":"/Images/BackEnd/Icon/DeActive.gif" %>' /></ItemTemplate>
                <FooterTemplate></FooterTemplate>
            </asp:TemplateColumn>

            <asp:TemplateColumn>
                <ItemTemplate>
                    <asp:ImageButton ID="btnUpdate" runat="server" CommandName="cmdUpdate" CommandArgument='<%#Eval("Id") %>' ImageUrl='/Images/BackEnd/Icon/update.png' Width="24px" />
                    <asp:ImageButton ID="btnDelete" runat="server" OnClientClick="return confirm('Are you sure, you want to delete this record?')" CommandName="cmdDelete" CommandArgument='<%#Eval("Id") %>' ImageUrl='/Images/BackEnd/Icon/delete.png'  Width="24px" />
                </ItemTemplate>
                <FooterTemplate>
                    <asp:ImageButton ID="btnAddNew" runat="server" CommandName="cmdAddNew" ImageUrl='/Images/BackEnd/Icon/add.png'  Width="24px" />
                </FooterTemplate>
            </asp:TemplateColumn>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black"  HorizontalAlign="Center" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center"  />
        <ItemStyle BackColor="#EEEEEE" ForeColor="Black"  HorizontalAlign="Center"  />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" 
            Mode="NumericPages" />
        <SelectedItemStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
    </asp:DataGrid>
</asp:Content>
